Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 feat: Add Custom Welcome Message in librechat.yaml #5870

Merged
merged 5 commits into from
Feb 22, 2025

Conversation

rubentalstra
Copy link
Collaborator

@rubentalstra rubentalstra commented Feb 14, 2025

Custom Welcome Message Feature

This update introduces a customizable welcome message for the chat interface. Administrators can now configure a greeting directly through the librechat.yaml file, enhancing branding and overall user experience.

Closes: #2967
Docs: LibreChat-AI/librechat.ai#236

Key Changes

  • Configuration & Setup:

    • Updated librechat.example.yaml to include a new customWelcome field, allowing administrators to define a custom greeting.
  • Backend Enhancements:

    • Modified api/server/routes/config.js to read the customWelcome from librechat.yaml and include it in the startup configuration payload.
    • Updated the configuration schema in packages/data-provider/src/config.ts to optionally accept a customWelcome.
  • Frontend Updates:

    • Refactored the welcome message logic in client/src/components/Chat/Landing.tsx to display the custom message when provided in the startup configuration.
    • Improved code readability and logic for handling both assistant and agent welcome messages.

Motivation and Context

By moving configuration to librechat.yaml, this change allows platform administrators to easily tailor the user experience with a custom greeting. The feature not only enhances first impressions but also contributes to a more personalized experience for end users.

Testing Process

  1. Backend Testing:

    • Start the server with a librechat.yaml file that defines a custom welcome message.
    • Verify that a request to /api/config includes the customWelcome field in its response.
  2. Frontend Testing:

    • Load the chat interface to confirm that the welcome message displays as configured.
    • Validate fallback behavior by testing scenarios where the custom welcome message is absent or empty.
    • Ensure that the logic for both assistant and agent welcome messages functions as expected.

Checklist

  • My code adheres to this project's style guidelines.
  • I have performed a self-review of my own code.
  • I have commented in any complex areas of my code.
  • My changes do not introduce new warnings.
  • I have written tests demonstrating that my changes are effective.
  • Local unit tests pass with my changes.
  • Any dependent changes have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

@rubentalstra rubentalstra added the ✨ enhancement New feature or request label Feb 14, 2025
@rubentalstra rubentalstra self-assigned this Feb 14, 2025
@rubentalstra rubentalstra marked this pull request as draft February 14, 2025 10:30
rubentalstra added a commit to rubentalstra/librechat.ai that referenced this pull request Feb 14, 2025
@rubentalstra rubentalstra marked this pull request as ready for review February 14, 2025 10:42
@danny-avila
Copy link
Owner

Thanks! Small nitpick but this would be really nice as part of the librechat.yaml instead of .env. Forward thinking, this would allow setting custom greetings at the user/role level, as mappings for all those settings will be possible.

@rubentalstra
Copy link
Collaborator Author

for sure. going to update the code to do that. it's just a minor change.

@rubentalstra rubentalstra marked this pull request as draft February 14, 2025 14:31
@rubentalstra rubentalstra changed the title 🚀 feat: Add Custom Welcome Message Support in LibreChat WIP 🚀 feat: Add Custom Welcome Message Support in LibreChat Feb 14, 2025
@rubentalstra rubentalstra changed the title WIP 🚀 feat: Add Custom Welcome Message Support in LibreChat 🚀 feat: Add Custom Welcome Message Support in LibreChat Feb 22, 2025
@rubentalstra rubentalstra marked this pull request as ready for review February 22, 2025 14:27
@rubentalstra rubentalstra changed the title 🚀 feat: Add Custom Welcome Message Support in LibreChat 🚀 feat: Add Custom Welcome Message Support in librechat.yaml Feb 22, 2025
@rubentalstra rubentalstra changed the title 🚀 feat: Add Custom Welcome Message Support in librechat.yaml 🚀 feat: Add Custom Welcome Message in librechat.yaml Feb 22, 2025
danny-avila pushed a commit to LibreChat-AI/librechat.ai that referenced this pull request Feb 22, 2025
* feat: Add Custom Welcome Message Support in LibreChat [#5870](danny-avila/LibreChat#5870)

* 📜 docs: update dotenv.mdx and interface.mdx to remove custom welcome message references
@danny-avila danny-avila merged commit 2a74ceb into main Feb 22, 2025
7 checks passed
@danny-avila danny-avila deleted the feat/Custom-Welcome-Message branch February 22, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Custom Welcome Message
2 participants